package com.itheima.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by itcast on 2019/10/21.
 */
@RestController
public class HelloController {
//    @RequestMapping(value = "/hi",method = RequestMethod.GET)
//    public String hi(@RequestParam(value = "id") String id){
//        String mid = "[学号:姓名:机器名]";
//        return "Hello World, I'm from hello provider!"+mid+id;
//    }
    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String name(@RequestParam(value = "name") String name){
        String mid = "[学号:姓名:机器名]";
        return "Hello World, I'm from hello provider!"+mid+name;
    }
    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    public String hi(@RequestParam(value = "age") String age){
        String mid = "[学号:姓名:机器名]";
        return "Hello World, I'm from hello provider!"+mid+age;
    }
}
